package com.mz.ozy.mvp.model;

import android.content.Context;

import com.mz.ozy.constants.Constants;
import com.mz.ozy.net.RetrofitUtils;
import com.mz.ozy.utils.JsonUtils;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;

/**
 * Created by administrator on 2018/12/3.
 */
public class MySellKtModel {

    public Observable<ResponseBody> geAssetsInfo(Context context, String type, String ordertype, String orderState, String page) {
        Map<String, String> maps = new HashMap<>();
        maps.put("type", type);
        maps.put("ordertype", ordertype);
        maps.put("orderState", orderState);
        maps.put("pageNo", page);
        maps.put("pageSize", Constants.PageSize);
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10104, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }

    public Observable<ResponseBody> cancelOrder(Context context, int orderid) {
        Map<String, String> maps = new HashMap<>();
        maps.put("id", String.valueOf(orderid));
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10105, JsonUtils.requestJsonDate(maps), Constants.tokenId);
    }
}
